// components/production/production.js
var total_micro_second = 10 * 1000; //这是10秒倒计时

/* 毫秒级秒杀倒计时 */

// 时间格式化输出，如1天天23时时12分分12秒秒12 。每10ms都会调用一次
function dateformat(proList) {
  let list = proList;
  for (let i of list) {
    i.status = format(i.statusOne);
    console.log(i.status)
  }
  return list;
}

function isDown(that) {
  for (let i of that.data.proList) {
    if (i.statusOne > 0) {
      return false;
    }
  }
  return true;
}



Component({
  /**
   * 组件的属性列表
   */
  properties: {
    proList: Array,
    item: Object,
    sts: Number,
    clock: String,
    start: Boolean
  },


  /**
   * 组件的初始数据
   */
  data: {
    clock: '111'
  },
  lifetimes: {
    // 组件的生命周期函数，用于声明组件的生命周期
    attached: function () {
     
    },
    ready: function () {
    },
    moved: () => {

    },
    detached: () => {

    },

  },

  /**
   * 组件的方法列表
   */
  methods: { 
    toProdPage: function (e) {
      var prodid = e.currentTarget.dataset.prodid;
      wx.navigateTo({
        url: '/pages/prod/prod?prodid=' + prodid,
      })
    },
  }
})
